/**
 * 作者：陈文斌 on 2019/1/12.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';

class IndustryCategoryListRow extends StatelessWidget {
  final String title;
  final GestureTapCallback onTap;
  final bool isSelect;

  IndustryCategoryListRow({
    Key key,
    @required this.title,
    this.onTap,
    this.isSelect = false,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Material(
      color: isSelect ? Colors.white : null,
      child: InkWell(
        onTap: onTap,
        child: Container(
          height: 50,
          child: Row(
            children: <Widget>[
              isSelect
                  ? Container(
                      color: AppColors.MainColor,
                      height: 30,
                      width: 2,
                    )
                  : Container(),
              Expanded(
                child: Center(
                  child: Text(title),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
